/* style.css */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    display: flex;
}
.left, .right {
    flex: 1; /* 等同于 flex-grow: 1; flex-shrink: 1; flex-basis: 0%; */
    height: 100%; /* 如果你想要它们占满整个视口的高度 */
    overflow: auto; /* 如果内容超出，则提供滚动条 */
    display: flex;
    flex-direction: column;
}
canvas {
    border: 0;
    margin: auto;
}
#winLayer {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 5px;
    z-index: 1000;
}
#resetButton {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}


.body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    margin: 0;
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f9;
}

.chat-container {
    width: 100vw; /* 宽度设置为视口宽度 */
    height: 100vh; /* 高度设置为视口高度 */
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #007bff;
    color: #ffffff;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.room-controls {
    display: flex;
    align-items: center;
    flex: 0.5;
}

#roomInput {
    padding: 5px;
    margin-right: 10px;
    border: none;
    border-radius: 5px;
    flex: 1;
}

#joinRoomBtn, #createRoomBtn {
    padding: 5px 10px;
    margin-left: 5px;
    background-color: #ffffff;
    color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#joinRoomBtn:hover, #createRoomBtn:hover {
    background-color: #e7f7ff;
}

.chat-history {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f0f0f0;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.message {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.message-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.message-sender {
    font-weight: bold;
    color: #333;
}

.message-timestamp {
    margin-left: 7px;
    font-size: 0.85em;
    color: #888;
}

.message-body {
    padding: 10px;
    background-color: #f9f9f9; /* 简约化的浅灰色背景 */
    border-radius: 4px;        /* 圆角 */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /* 轻微的阴影效果，可选 */
    word-wrap: break-word;
}

/* 如果想要区分发送方和接收方的消息，可以使用不同的背景色或对齐方式 */
.sent {
    background-color: #95ec69;
}

.chat-input {
    display: flex;
    padding: 10px;
}

#messageInput {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd; /* 设置边框颜色 */
    border-radius: 5px;
    resize: none; /* 禁止用户调整大小 */
    outline: none; /* 移除默认的聚焦边框 */
}

#messageInput:focus {
    border-color: #ddd; /* 保持边框颜色不变 */
    box-shadow: none; /* 移除可能的聚焦阴影 */
}

button {
    padding: 10px 20px;
    margin-left: 10px;
    background-color: #007bff;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#sendBtn:hover {
    background-color: #0056b3;
}


/* 按钮样式 */
.game-button {
    display: block;
    margin: 5px;
    padding: 10px;
    cursor: pointer;
}
/* 玩家信息样式 */
.player-info {
    margin: 20px 5px;
}
.player {
    display: inline-block;
    margin-right: 20px;
}

.chat-output{
    width: 600px;
    display: flex;
    flex-direction: column;
}
.game-button-container{

}

#join-as-spectator{
    margin: 20px 5px;
}

#spectator-seat{
    margin: 20px 5px;
}